package com.springcloud.learn;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * Created by Administrator on 2017/11/7.
 */
@FeignClient(value="hello-service",fallback = HelloServiceFallBack.class)
public interface HelloService {


    @RequestMapping("/hello")
    String hello();


    @RequestMapping(value="/hello1",method = RequestMethod.GET)
    String hello1(@RequestParam("name") String name);



    @RequestMapping(value="/hello2",method = RequestMethod.GET)
    User hello2(@RequestHeader("name") String name,@RequestHeader("age") Integer age);


    @RequestMapping(value="/hello3",method = RequestMethod.POST)
    String hello3(@RequestBody User user);


}
